<template>
	<div id="alumni">
        <vHead appPath="/alumni" appTitle="校友服务">
            <el-button type="primary" v-if="indentify" @click="turn">校友服务管理</el-button>
        </vHead>
		<main class="main">
			<!-- <keep-alive include="news"> -->
				<router-view :key="this.$route.query.id" />
			<!-- </keep-alive> -->
		</main>
		<foote />
	</div>
</template>

<script>
    import vHead from "@/components/common/header";
	import foote from './footer';
	export default{
		components: {
			vHead,foote,
        },
        methods:{
            turn(){
                var url = sessionStorage.getItem('manage_url');
                var host = sessionStorage.getItem('host');
                var token = sessionStorage.getItem('redirect_params');
                // console.log(url + '/admin' + token + '&host=' + host + '&routerUrl=' + '/life/alumni/alumni-list');
                // console.log(decodeURIComponent(url + '/admin' + token + '&host=' + host + '&routerUrl=' + '/life/alumni/alumni-list'));   
                window.open(decodeURIComponent(url + '/admin' + token + '&host=' + host + '&routerUrl=' + '/life/alumni/alumni-list'));   

            }
        },
        computed:{
            indentify(){
                var role = JSON.parse(sessionStorage.getItem('user_info_str')).role;
                
                for(var i=0;i<role.length;i++){
                    if(role<=3){
                        return true
                    }
                }

                return false
            }
        }
	}
</script>
<style lang="scss">
	.main{
		min-height: calc(100vh - 164px);
		padding: 25px 0 0;
		font-family: MicrosoftYaHei;
		.pointer:hover{
			cursor:pointer;
		}
	}
</style>